﻿using Engine.Graphics;
using Scenario_Editor.Tools;
using System;
using System.Windows.Forms;

namespace Scenario_Editor.AddinManager
{
    public interface IAddinScenarioEditor
    {
        #region Public Properties

        IExporter Exporter { get; set; }

        /// <summary>
        /// Reference to terrainPainting Comtrol.
        /// </summary>
        ITerrainPaintingControl TerrainPaintingControl { get; }

        #endregion Public Properties

        #region Public Methods

        void AutomaticTextureing(ITerrain terrain);

        /// <summary>
        /// Exports scenario to addin.
        /// </summary>
        /// <param name="scenarioFile"></param>
        void ExportScenario(ScenarioFile scenarioFile);

        string GetGameName();

        /// <summary>
        /// a Control for editing the IMaterial which is created in gameDll.
        /// </summary>
        Scenario_Editor.AddinManager.IMaterialEditorControl GetNewMaterialEditControl();

        ToolStripMenuItem GetToolstripitems();

        /// <summary>
        /// Imports textures from game to Scenery Editors texture-folder.
        /// </summary>
        /// <param name="sceneryEditorTextureFolder"></param>
        void ImportTexturesFromGame(string sceneryEditorTextureFolder);

        /// <summary>
        /// Loads a Addin specific scenery.
        /// </summary>
        /// <returns></returns>
        ISceneryExtractor LoadScenery(Engine.Engine engine, ShaderManager shaderManager, Engine.Camera.Camera camera);

        void OnMaterialMangerChanged(object materialManager, EventArgs eventArgs);

        void OnTerrainChanged(object sender, System.EventArgs e);

        /// <summary>
        /// This method is calling by terrainpainter to change the vertexdata. the "originalVertexData" is the current vertex of the terrain vertex.
        /// it can be changed in the addin. After changing the new vertexdata will be returned.
        /// </summary>
        /// <param name="originalVertexData">current vertexdata of terrain vertex data</param>
        /// <param name="newVertexData">the new vertexdata</param>
        /// <returns></returns>
        IGameVertex PaintVertex(IGameVertex originalVertexData, IGameVertex newVertexData);

        /// <summary>
        /// Get Toolstripbuttons for different Rendermodes. They will be inserted in the maintoolbar.
        /// </summary>
        /// <returns></returns>
        ToolStripButton[] GetToolstripbuttonRendermodes();

        #endregion Public Methods
    }
}